package com.wuyixu.service.impl;

import java.util.List;

import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import com.wuyixu.dao.CategoryMapper;
import com.wuyixu.domain.Category;
import com.wuyixu.service.CategoryService;
@Service(interfaceClass=CategoryService.class)
public class CategoryServiceImpl implements CategoryService{
	@Autowired
	private CategoryMapper categoryMapper;
	@Override
	public int add(Category category) {
		// TODO Auto-generated method stub
		return categoryMapper.add(category);
	}

	@Override
	public int update(Category category) {
		// TODO Auto-generated method stub
		return categoryMapper.update(category);
	}

	@Override
	public int del(int id) {
		// TODO Auto-generated method stub
		return categoryMapper.delete(id);
	}

	@Override
	public List<Category> list(int parentId) {
		// TODO Auto-generated method stub
		return categoryMapper.list(parentId);
	}

}
